//
//  NewsRootTableViewCell.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/28.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ZDQNewsRootTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation NewsRootTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self create];
    }
    
    return self;
    
}


- (void)create {
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    self.titleLabel.font = [UIFont systemFontOfSize:15];
    
    self.leftImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.leftImageView];
    
    self.centerImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.centerImageView];
    
    self.rightImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.rightImageView];
    
    
    
}



- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    
    
    
    self.titleLabel.frame = CGRectMake(10 * WIDTH / 375, 5 * HEIGHT / 100, WIDTH - 20 * WIDTH / 375, HEIGHT / 3 - 10 * HEIGHT / 100);
    self.leftImageView.frame = CGRectMake(10 * WIDTH / 375, HEIGHT / 3 + 5 * HEIGHT / 100, WIDTH / 3 - 20 * WIDTH / 375, HEIGHT / 3 * 2 - 10 * HEIGHT / 100);
    self.centerImageView.frame = CGRectMake(WIDTH / 3 + 10 * WIDTH / 375, HEIGHT / 3 + 5 * HEIGHT / 100, WIDTH / 3 - 20 * WIDTH / 375, HEIGHT / 3 * 2 - 10 * HEIGHT / 100);
    self.rightImageView.frame = CGRectMake(WIDTH / 3 * 2 + 10 * WIDTH / 375, HEIGHT / 3 + 5 * HEIGHT / 100, WIDTH / 3 - 20 * WIDTH / 375, HEIGHT / 3 * 2 - 10 * HEIGHT / 100);
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
